<script>
	import {
		mapMutations,
		mapState
	} from 'vuex';
	export default {
		globalData: {
			set_API: null,
			closeLists: null, // 商品分类 切换规格模板
			downList: null,
			editMap: null,
			clazz: null, // 平台分类
			shopClazz: null, // 商品分类
			store_id: "", // 库存ID
			release: null, // 发布成功

			promotion: "", // 促销
			restriction: "", // 限购
			min: "", // 最小
			stair: "", // 阶梯
			full: "", // 满减
			rest: "", // 其他

			freight: "", // 运费
			freight_template: "", // 运费模板

			pro_detail: "", // 促销活动详情
			brand_item: "", // 品牌

			selected: false, // 已选分类
			act_range: 0, // 活动类型

			tally_item: null, // 客户标签

			next_detail: null, // 上一步开关

			seach_show: null, // 搜索开关
		},
		methods: {
			...mapMutations(['webUrl']),
		},

		onLaunch: function() {
			if (!uni.getStorageSync("token")) {
				uni.reLaunch({
					url: '/pages/login/login'
				})
			}

			// 初始化登录状态
			this.$store.commit('initUser')
			console.log('App Launch')
			let web_Url = "https://aaa.slwjpfw.com/sites/storeapi/";
			let demo_Url = "https://aaa.slwjpfw.com/sites/storeapi/";
			if (uni.getStorageSync("toggle").name == "默认") {
				this.webUrl(web_Url)
			} else if (uni.getStorageSync("toggle").name == "世联DEMO") {
				this.webUrl(demo_Url)
			} else {
				this.webUrl(web_Url)
			}
			if (uni.getStorageSync('user_id')) {
				uni.$timlogin()
			}
		},
		onLoad() {

		},
		onShow: function() {
			console.log('App Show');
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	// #ifndef APP-NVUE
	/*每个页面公共css */
	@import "uview-ui/index.scss";
	@import "./common/zcm-main.css";

	/* 头像 */
	::-webkit-scrollbar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		-webkit-appearance: none;
		background: transparent;
		color: transparent;
	}

	* {
		margin-bottom: 0;
		margin-bottom: constant(safe-area-inset-bottom);
		margin-bottom: env(safe-area-inset-bottom);
	}

	.iPhoneX {
		height: 20upx;
	}

	textarea {
		width: 95%;
		height: 120upx;
		z-index: 0;
	}

	input {
		z-index: 0;
	}

	page {
		background-color: $u-bg-color;
	}

	.u-navbar-inner {
		width: 100%;
	}

	.scroll_header {
		height: 0.5upx;
	}

	.common_content .box {
		width: 110upx;
		height: 110upx;
		display: flex;
		justify-content: center;
		align-items: center;
		border-radius: 50%;
		background-color: #fff3f3;
	}

	.common_content .boxx {
		width: 135upx;
		height: 110upx;
		display: flex;
		justify-content: center;
		align-items: center;
		border-radius: 50%;
	}

	.common_content {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		flex-wrap: wrap;
	}

	.common_img {
		width: 70upx;
		height: 70upx;
	}

	.icon_no_data {
		width: 250upx;
		height: 250upx;
	}

	.release {
		z-index: 22;
	}

	.goods_logo {
		position: absolute;
		top: 0;
		right: 0;
		z-index: 1111;
		padding: 5upx 10upx;
		background-color: #F31E3E;
		border-radius: 20upx 20upx 0 20upx;
	}

	.release /deep/ button {
		width: 85%;
		border-radius: 50upx;
		background: linear-gradient(to right, #F31E3E, #FB4F37);
	}

	.footer {
		height: 125upx;
	}

	.clazz {
		height: 106upx;
	}

	.appoint {
		width: 35upx;
		height: 35upx;
	}

	.active {
		color: #BA5158;
	}

	.active_today {
		color: #ff0000;
		border-bottom: 5rpx solid #ff0000;
	}

	.icon_right_arrow {
		width: 30upx;
		height: 30upx;
	}

	.login_img {
		width: 110upx;
		height: 110upx;
		// border-radius: 50%;
	}

	.video_img {
		width: 50upx;
		height: 50upx;
	}

	.boards_content_img {
		width: 180upx;
		height: 170upx;
		border-radius: 50%;
	}

	.goods_popup {
		background-color: red;
	}

	.chu {
		width: 30upx;
		height: 30upx;
		line-height: 30upx;
		text-align: center;
		border-radius: 5upx;
		font-size: 19upx;
		color: #fff;
		position: relative;
		top: -6upx;
		background-color: #18B566;
	}

	.backtrack {
		width: 47upx;
		height: 47upx;
	}

	.promotion {
		width: 200upx;
		height: 200upx;
	}

	.promotion_img {
		width: 200upx;
		height: 200upx;
	}

	.pro_name {
		width: 100%;
		height: 80upx;
	}

	.btn /deep/ button {
		width: 85%;
		border-radius: 50upx;
		background: linear-gradient(to right, #F31E3E, #FB4F37);
	}

	.ps_img {
		width: 40upx;
		height: 30upx;
	}

	.b_top {
		width: 100%;
		border-top: 1px solid #EAEAEA;
	}

	.add-certificates {
		border: 1px dashed #e0e0e0;
		background-color: #f3f3f3;
	}

	.add-certificates image {
		width: 40upx;
		height: 40upx;
	}

	.wh-40 {
		width: 40upx;
		height: 40upx;
	}

	// #endif
</style>